<template>
  <!-- 老师列表 -->
  <div class="inquire">
    <input type="text" placeholder="请输入姓名">
    <input type="text" placeholder="请输入账号">
    <button>查询</button>
  </div>
  <el-table :data="tableData.list" border stripe style="font-size: 12px;" :cell-style="{ 'text-align': 'center' }">
    <el-table-column type="index" label="序号" width="50" header-align="center" />
    <el-table-column prop="school" label="所属学校" header-align="center" />
    <el-table-column prop="teacherName" label="老师姓名" header-align="center" />
    <el-table-column prop="sex" label="性别" width="50" header-align="center" />
    <el-table-column prop="jobNum" label="工号" width="100" header-align="center" />
    <el-table-column prop="department" label="所属部门" header-align="center" />
    <el-table-column prop="subject" label="任教科目" header-align="center" />
    <el-table-column prop="position" label="现任职务" header-align="center" />
    <el-table-column prop="account" label="账号" width="150" header-align="center" />
  </el-table>
</template>

<script setup>
import { onMounted, ref } from "vue"
import { teacher_List } from "../../../utils/api";

var tableData = ref({
  list: []
})

onMounted(() => {
  teacher_List().then((res) => {
    // console.log(res.data.teacherList);
    tableData.value.list = res.data.teacherList
  })
})
</script>

<style lang="scss" scoped>
.inquire {
  height: auto;

  input {
    width: 150px;
    border-radius: 3px;
    line-height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.247058823529412);
    outline: none;
    font-size: 12px;
    padding: 3px;
    margin-bottom: 10px;
  }

  input:nth-child(2) {
    margin-left: 20px;
  }

  ::-webkit-input-placeholder {
    color: rgb(217, 217, 217);
  }

  button {
    background-color: #1890ff;
    width: 60px;
    height: 28px;
    color: #fff;
    border: none;
    border-radius: 3px;
    margin-left: 20px;
    font-size: 12px;
  }
}
</style>